<?php

use Encore\Admin\Facades\Admin;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    //默认
    $router->get('/', "HomeController@index");
    //用户列表
    $router->resource('user', UserController::class);
    //用户审核
    $router->post('user/verify', "UserController@verify");
    //声优取消
    $router->post('host/cancel', "UserController@host_cancel");
    //banner位列表
    $router->resource('banner', BannerController::class);
    //声优申请审核
    $router->resource('host_apply', HostApplyController::class);
    //声优列表
    $router->any('host', 'UserController@host');

    $router->put('host/{id}', 'UserController@updateScore');
    //虚拟账户
    $router->resource('usercoin', UserCoinController::class);
    $router->post('usercoin/op', "UserCoinController@verify");
    //语音话单详情
    $router->resource('voicecall', VoiceCallController::class);
    //视频话单详情
    $router->resource('videocall', VideoCallController::class);
    //配置-充值
    $router->resource('setting/recharge', RechargeConfigController::class);
    //充值记录
    $router->resource('payorder', PayOrderController::class);
    //交易记录
    $router->resource('coinlog', CoinLogController::class);
    //当前正在通话列表
    $router->resource('chatting', ChattingController::class);
    //免费通话用户池
    $router->resource('official_host', FreeCallHostController::class);
    //提现资料审核
    $router->resource('withdraw/profile', PersonalProfileController::class);
    //提现审核
    $router->resource('withdraw', WithdrawController::class);
    //提现资料审核
    $router->post('personal_profile/verify', "PersonalProfileController@verify");
    //提现操作
    $router->post('withdraw/verify', "WithdrawController@verify");
    //免费通话用户池操作
    $router->post('official_host/op', "FreeCallHostController@user_op");
    //话单操作
    $router->post('voice_call/op', "ChattingController@call_op");
    //声优申请操作
    $router->post('host_apply/op', "HostApplyController@apply_op");
    //推送消息管理
    $router->resource('push_message', PushMessageController::class);
    //用户虚拟币操作
    $router->resource('usercoin_op', UserCoinOpController::class);
    //邀请管理
    $router->resource('user_invite', UserInviteController::class);
    $router->post('invite/op', "UserInviteController@op");
    //版本管理
    $router->resource('app_version', VersionController::class);
    //声优申请操作
    $router->post('app_version/op', "VersionController@version_op");
    //声优资费和星标管理
    $router->resource('host_config', HostConfigInfoController::class);
    //渠道号管理
    $router->resource('channel', ChannelController::class);
    //问题
    $router->resource('question', QuestionController::class);
    //官方回复
    $router->resource('official_question', OfficialQuestionController::class);
    //动态
    $router->resource('moment', MomentController::class);
    //用户审核
    $router->post('moment/verify', "MomentController@verify");
    //语音文案
    $router->resource('voice_text', VoiceTextController::class);
    //礼物列表
    $router->resource('gift', GiftController::class);
    //礼物记录
    $router->resource('gift_log', GiftLogController::class);
    //客服系统
    $router->resource('im/official', OfficialImController::class);
    //代理列表
    $router->resource('guild', GuildController::class);
    //代理女用户列表
    $router->resource('guild_host', GuildHostController::class);
    //代理结算日报
    $router->resource('guild_account_daily', GuildAccountDailyController::class);
    //代理结算月报
    $router->resource('guild_account_monly', GuildAccountMonlyController::class);
    //代理女用户分成
    $router->any('guild_host_share', "GuildAccountDailyController@host_share");
    //获取代理列表
    $router->get('get_guilds', "GuildHostController@get_guilds");
    //获取所有代理列表
    $router->get('get_guilds_all', "GuildHostController@get_guilds_all");
    //获取代理列表
    $router->post('remove_host', "GuildHostController@remove_host");
    //代理操作
    $router->post('guild_op', "GuildController@guild_op");
    //举报记录
    $router->resource('user_report', ReportController::class);
    //举报记录处理
    $router->post('user_report/status', "ReportController@status");
    //动态留言
    $router->resource('moment_comment', MomentCommentController::class);
    //留言审核
    $router->post('comment/verify', "MomentCommentController@verify");
    //消息记录
    $router->resource('msg_log', MsgLogController::class);
    //内部工具
    $router->resource('silent_push', SlientPushController::class);
    //打招呼消息审核
    $router->resource('automsg', AutoMsgController::class);
    //审核
    $router->post('automsg/verify', "AutoMsgController@verify");
    //用户标签
    $router->resource('user_tag', UserTagController::class);
    //专访设置
    $router->resource('user_question', UserQuestionController::class);
    //用户专访内容
    $router->resource('user_qa', UserQaController::class);
    //审核
    $router->post('qa/verify', "UserQaController@verify");
    //用户等级内容
    $router->resource('user_level', UserLevelController::class);
    //资料审核
    $router->any('profile_vrfy', "ProfileVerfyController@index");
    //照片墙审核
    $router->any('profile_poster_vrfy', "ProfileVerfyController@index_poster");
    //微信审核
    $router->any('profile_wechat', "ProfileVerfyController@index_wechat");
    //资料审核
    $router->post('profile/verify', "ProfileVerfyController@verify");
    //真人头像
    $router->resource('real_avatar', RealAvatarController::class);
    $router->post('real_avatar/verify', "RealAvatarController@verify");
    //敏感词
    $router->resource('blackwords', BlackWordsController::class);
    //审核操作-头像
    $router->resource('user_avatar', UserAvatarController::class);
    //头像审核
    $router->post('avatar/verify', "UserAvatarController@verify");
    //女用户头像审核
    $router->any('host_avatar', 'UserAvatarController@host_avatar');
    //快捷自动消息设置
    $router->resource('setting_automsg', SettingAutoMsgController::class);
    //用户注销记录
    $router->resource('cancel_log', CancelLogController::class);
    //注销操作
    $router->post('cancel_log/verify', 'CancelLogController@verify');
    //充值排行
    $router->resource('pay_rank', PayRankController::class);
    //女用户收入
    $router->any('host_income', "PayRankController@icome_index");
    //女用户收入时间段内收入
    $router->any('host_income_time', "PayRankController@icome_index_time");
    //礼物分配
    $router->resource('setting_allocate', SettingAllocateController::class);

    //女用户评级
    $router->resource('host_cate', HostController::class);
    //女用户评级（新）
    $router->resource('host_cate_new', HostCateController::class);
    //速配呼叫充值奖励
    $router->resource('recharge_by_call', RechargeByCallController::class);

    $router->resource('close_friends', CloseFriendController::class);
    $router->resource('setting_app_hidden', SettingApphiddenController::class);
    //通话评价
    $router->resource('call_comment', CallCommentController::class);
    //通话评价操作
    $router->post('call_comment/verify', 'CallCommentController@verify');
    //白名单手机号
    $router->resource('white_phone', WhitePhoneController::class);
    //白名单女用户
    $router->resource('white_host', WhiteHostController::class);
    //TLS
    $router->resource('tmp_extra', TmpExtraController::class);
    $router->post('tmp_setting/submit', 'TmpExtraController@submit');
    $router->resource("blacklist_setting",\Blacklist\BlacklistSettingController::class);

    #公共配置
    $router->resource('sys_config_manage', SysConfigManageController::class);

    #充值限制
    $router->resource('recharge_limit', UsersRechargeLimitController::class);

    $router->resource('app_policy', AppStandardController::class);

    #vivo推广数据
    $router->resource('ocpc_vivo_log', OcpcVivoLogControllers::class);
    #oppo数据回传
    $router->resource('ocpc_oppo_log', OcpcOppoLogControllers::class);
    #小米
    $router->resource('ocpc_xiaomi_log', OcpcXiaomiLogControllers::class);

    # 用户封禁管理
    $router->resource('user_freeze', UserFreezeController::class);

    # 用户禁言管理
    $router->resource('user_forbidden', UserForbiddenController::class);

    # 违规名单公示
    $router->resource('user_violation_publicize', ViolationPublicizeController::class);

    # 视频通话鉴黄配置
    $router->resource('video_call_audit_config', VideoCallAuditConfigController::class);

    # 取消黑名单列表
    $router->resource('cancel_black', CancelBlackController::class);

    # 用户消费统计
    $router->resource('consume_statistics', ConsumeStatisticsController::class);
    # 男用户分级配置
    $router->resource('man_user_type_rule', ManUserTypeRuleController::class);

    # 女用户分级配置
    $router->resource('woman_user_type_rule', WomanUserTypeRuleController::class);

    # 特惠视频用户
    $router->resource('discount_video_user', DiscountVideoUserController::class);

    # 特惠视频用户
    $router->any('discount_video_rank', 'DiscountVideoUserController@rank');

    # 视频周星榜
    $router->any('video_rank', 'ActivitiesController@videoRank');

    //录音
    $router->resource('tap_list', TapeController::class);

    //录音
    $router->resource('user_recode_login', UserLoginLogController::class);

    //等级
    $router->resource('user_rating', UsersRatingController::class);


});

/**
 * 统计
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers\\Stat',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    //统计日报
    $router->resource('stat_daily', StatDailyController::class);
    $router->resource('stat_daily_new', StatDailyNewController::class);
    $router->get('get_channels', "StatDailyController@getChannels");
    //名义私信礼物
    $router->resource('stat_daily_sysgift', StatDailySysgiftController::class);
    //话单日报
    $router->resource('stat_daily_call', StatDailyCallController::class);
    //消费日报
    $router->any('stat_daily_coin', "StatDailyController@index_coin");
    //openinstall日报
    $router->any('stat_openinstall', "StatDailyController@index_openinstall");
    //留存
    $router->resource('stat_daily_keep', StatDailyKeepController::class);
    //邀请信息
    $router->resource('invite_info', StatInviteInfoController::class);
    //充值日报
    $router->resource('stat_daily_pay', StatDailyPayInfoController::class);

    //oppo推广消息
    $router->resource('stat_ocpc_oppo', StatOcpcOppoController::class);
    //vivo推广消息
    $router->resource('stat_ocpc_vivo', StatOcpcVivoController::class);

    //oppo推广消息
    $router->resource('stat_ocpc_oppo', StatOcpcOppoController::class);

    //小米推广消息
    $router->resource('stat_ocpc_xiaomi', StatOcpcXiaomiController::class);

    $router->resource('stat_daily_tg',StatDailyTgController::class);
});

/**
 * 活动
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers\\Act',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    //许愿树
    $router->resource('wish_tree', WishTreeGiftController::class);
    //许愿树抽奖记录
    $router->resource('wish_tree_log', WishTreeLogController::class);
    //许愿树抽奖记录
    $router->resource('signin_log', SigninController::class);
});

/**
 * 日志
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers\\Log',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    //声网回调日志
    $router->resource('agora_log', AgoraLogController::class);
    //融云审核日志记录
    $router->resource('rongcloud_results','RongcloudResultsController');
});

/**
 * 财务
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers\\Finance',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    $router->resource('fin_daily_info', DailyInfoController::class);
});

/**
 * 心友
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers\\XinYou',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    //推广日报
    $router->resource('xinyou/guild_daily', GuildAccountDailyController::class);
    //推广员提现
    $router->resource('xinyou/guild_withdraw',GuildWithdrawController::class);
    //推广员账户数据
    $router->resource('xinyou/guild_balance', GuilBalanceController::class);
    //提现操作
    $router->post('guild_withdraw/verify', "GuildWithdrawController@verify");
    //女用户分成
    $router->any('xinyou/guild_host_share', "GuildAccountDailyController@host_share");
});


/**
 * 风险控制
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    //百度推广日志记录
    $router->resource('baidu_log', OcpcBaiduLogController::class);

    $router->resource('risk', RiskController::class);
});


/**
 * 小视频管理
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    $router->resource('short-video', ShortVideoController::class);
});

/**
 * 超管员配置
 */
Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => 'App\\Admin\\Controllers',
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {
    $router->resource('super-admin', SuperAdminController::class);
});
